<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>Parser (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>

  <script type="text/javascript" src="//www.google.com/jsapi"></script>
  <script type="text/javascript">
     google.load("visualization", "1", {packages:["orgchart"]});
     var _loadingVisualizations = true;
  </script>

  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
        <span class="fn">proto2.TextFormatSerializer.Parser</span>
        <span>Extends</span>
        <span class="fn-name">
          
        </span>
</div>

<div class="g-section g-tpl-75-25">
  <div class="g-unit g-first" id="description">
    Helper class for parsing the text format.

  </div>


        <div class="g-unit" id="useful-links">
          <div class="title">Useful links</div>
          <ol>
            <li><a href="<a href="http://goo.gl/QDmDr">http://goo.gl/QDmDr</a>">Also See:</a></li>
            <li><a href="local_closure_goog_proto2_textformatserializer.js.source.html"><span class='source-code-link'>Source Code</span></a></li>
            <li><a href="http://code.google.com/p/closure-library/source/browse/local/closure/goog/proto2/textformatserializer.js">Git</a></li>
          </ol>
        </div>
</div>






<h2 class="g-first">Inheritance</h2>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
  <tr><td>goog.proto2.TextFormatSerializer.Parser</td><td></td></tr>
</table>
</div>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
</table>
</div>




  <h2>Constructor</h2>
      <div class="fn-constructor">
    goog.proto2.TextFormatSerializer.Parser(<span></span>)
  </div>



<h2>Instance Methods</h2>


  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_proto2_TextFormatSerializer_Parser.html">
              goog.proto2.TextFormatSerializer.Parser
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.proto2.TextFormatSerializer.Parser.prototype.consumeFieldValue_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">consumeFieldValue_<span class="args">(<span class="arg">message</span>,&nbsp;<span class="arg">field</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
      </div>


     <div class="entryOverview">
       Attempts to consume the value of the given field.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">message</span>
        : <span class="type"><a href="class_goog_proto2_Message.html">goog.proto2.Message</a></span>
        <div class="entryOverview">The parent message.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">field</span>
        : <span class="type"><a href="class_goog_proto2_FieldDescriptor.html">goog.proto2.FieldDescriptor</a></span>
        <div class="entryOverview">The field.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;
            True on success, false otherwise.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_proto2_textformatserializer.js.source.html#line651">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.proto2.TextFormatSerializer.Parser.prototype.consumeField_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">consumeField_<span class="args">(<span class="arg">message</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
      </div>


     <div class="entryOverview">
       Attempts to consume a field under a message.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">message</span>
        : <span class="type"><a href="class_goog_proto2_Message.html">goog.proto2.Message</a></span>
        <div class="entryOverview">The parent message. If null, then the
    field value will be consumed without being assigned to anything.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;
            True on success, false otherwise.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_proto2_textformatserializer.js.source.html#line886">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.proto2.TextFormatSerializer.Parser.prototype.consumeIdentifier_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">consumeIdentifier_<span class="args">()</span>
        </span>
        &#8658; <span>?</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
      </div>


     <div class="entryOverview">
       Consumes an IDENTIFIER token.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>?</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>&nbsp;
            The string value or null on error.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_proto2_textformatserializer.js.source.html#line982">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.proto2.TextFormatSerializer.Parser.prototype.consumeMessage_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">consumeMessage_<span class="args">(<span class="arg">message</span>,&nbsp;<span class="arg">delimiter</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
      </div>


     <div class="entryOverview">
       Attempts to consume the given message.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">message</span>
        : <span class="type"><a href="class_goog_proto2_Message.html">goog.proto2.Message</a></span>
        <div class="entryOverview">The message to consume and fill. If
   null, then the message contents will be consumed without ever being set
   to anything.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">delimiter</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The delimiter expected at the end of the message.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;
            True on success, false otherwise.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_proto2_textformatserializer.js.source.html#line624">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.proto2.TextFormatSerializer.Parser.prototype.consumeNestedMessage_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">consumeNestedMessage_<span class="args">(<span class="arg">message</span>,&nbsp;<span class="arg">field</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
      </div>


     <div class="entryOverview">
       Attempts to consume a nested message.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">message</span>
        : <span class="type"><a href="class_goog_proto2_Message.html">goog.proto2.Message</a></span>
        <div class="entryOverview">The parent message.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">field</span>
        : <span class="type"><a href="class_goog_proto2_FieldDescriptor.html">goog.proto2.FieldDescriptor</a></span>
        <div class="entryOverview">The field.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;
            True on success, false otherwise.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_proto2_textformatserializer.js.source.html#line814">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.proto2.TextFormatSerializer.Parser.prototype.consumeNumber_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">consumeNumber_<span class="args">()</span>
        </span>
        &#8658; <span>?</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
      </div>


     <div class="entryOverview">
       Consumes a NUMBER token.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>?</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>&nbsp;
            The string value or null on error.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_proto2_textformatserializer.js.source.html#line994">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.proto2.TextFormatSerializer.Parser.prototype.consumeString_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">consumeString_<span class="args">()</span>
        </span>
        &#8658; <span>?</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
      </div>


     <div class="entryOverview">
       Consumes a STRING token.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>?</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>&nbsp;
            The *deescaped* string value or null on error.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_proto2_textformatserializer.js.source.html#line1006">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.proto2.TextFormatSerializer.Parser.prototype.consumeToken_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">consumeToken_<span class="args">(<span class="arg">type</span>)</span>
        </span>
        &#8658; <span>?</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
      </div>


     <div class="entryOverview">
       Consumes a token of the given type.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">type</span>
        : <span class="type">goog.proto2.TextFormatSerializer.Tokenizer_.TokenTypes</span>
        <div class="entryOverview">The type
    of the token to consume.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>?</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>&nbsp;
            The string value of the token or null on error.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_proto2_textformatserializer.js.source.html#line964">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.proto2.TextFormatSerializer.Parser.prototype.consumeUnknownFieldValue_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">consumeUnknownFieldValue_<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
      </div>


     <div class="entryOverview">
       Attempts to consume the value of an unknown field. This method uses
heuristics to try to consume just the right tokens.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;
            True on success, false otherwise.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_proto2_textformatserializer.js.source.html#line847">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.proto2.TextFormatSerializer.Parser.prototype.consume_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">consume_<span class="args">(<span class="arg">value</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
      </div>


     <div class="entryOverview">
       Consumes a token with the given value. If not found, reports an error.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">value</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The string value expected for the token.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;
            True on success, false otherwise.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_proto2_textformatserializer.js.source.html#line1024">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.proto2.TextFormatSerializer.Parser.prototype.getError"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getError<span class="args">()</span>
        </span>
        &#8658; <span>?</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>?</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>&nbsp;
            The parse error, if any.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_proto2_textformatserializer.js.source.html#line599">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.proto2.TextFormatSerializer.Parser.prototype.getFieldValue_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getFieldValue_<span class="args">(<span class="arg">field</span>)</span>
        </span>
        &#8658; <span class="type">*</span>
      </div>


     <div class="entryOverview">
       Attempts to parse the given field's value from the stream.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">field</span>
        : <span class="type"><a href="class_goog_proto2_FieldDescriptor.html">goog.proto2.FieldDescriptor</a></span>
        <div class="entryOverview">The field.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type">*</span>&nbsp;
            The field's value or null if none.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_proto2_textformatserializer.js.source.html#line713">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.proto2.TextFormatSerializer.Parser.prototype.lookingAtType_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">lookingAtType_<span class="args">(<span class="arg">type</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">type</span>
        : <span class="type">goog.proto2.TextFormatSerializer.Tokenizer_.TokenTypes</span>
        <div class="entryOverview">The
    token type.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;
            True if the current token has the given type.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_proto2_textformatserializer.js.source.html#line1051">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.proto2.TextFormatSerializer.Parser.prototype.lookingAt_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">lookingAt_<span class="args">(<span class="arg">value</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">value</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The value to check against.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;
            True if the current token has the given string value.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_proto2_textformatserializer.js.source.html#line1039">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.proto2.TextFormatSerializer.Parser.prototype.parse"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">parse<span class="args">(<span class="arg">message</span>,&nbsp;<span class="arg">data</span>,&nbsp;<span class="arg">opt_ignoreMissingFields</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
      </div>


     <div class="entryOverview">
       Parses the given data, filling the message as it goes.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">message</span>
        : <span class="type"><a href="class_goog_proto2_Message.html">goog.proto2.Message</a></span>
        <div class="entryOverview">The message to fill.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">data</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The text format data.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">opt_ignoreMissingFields</span>
        : <span class="type">boolean=</span>
        <div class="entryOverview">If true, fields missing in the
    proto will be ignored.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;
            True on success, false on failure. On failure, the
    getError method can be called to get the reason for failure.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_proto2_textformatserializer.js.source.html#line586">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.proto2.TextFormatSerializer.Parser.prototype.reportError_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">reportError_<span class="args">(<span class="arg">msg</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Reports a parse error.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">msg</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The error message.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_proto2_textformatserializer.js.source.html#line609">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.proto2.TextFormatSerializer.Parser.prototype.tryConsume_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">tryConsume_<span class="args">(<span class="arg">value</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
      </div>


     <div class="entryOverview">
       Attempts to consume a token with the given string value.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">value</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The string value for the token.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;
            True if the token matches and was consumed, false
   otherwise.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_proto2_textformatserializer.js.source.html#line947">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>




<h2>Instance Properties</h2>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_proto2_TextFormatSerializer_Parser.html">
              goog.proto2.TextFormatSerializer.Parser
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.proto2.TextFormatSerializer.Parser.prototype.error_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">error_</span>
        : 
     </div>


     <div class="entryOverview">
       The error during parsing, if any.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_proto2_textformatserializer.js.source.html#line559">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.proto2.TextFormatSerializer.Parser.prototype.ignoreMissingFields_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">ignoreMissingFields_</span>
        : 
     </div>


     <div class="entryOverview">
       Whether to ignore missing fields in the proto when parsing.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_proto2_textformatserializer.js.source.html#line573">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.proto2.TextFormatSerializer.Parser.prototype.tokenizer_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">tokenizer_</span>
        : <span class="type"><a href="class_goog_proto2_TextFormatSerializer_Tokenizer_.html">goog.proto2.TextFormatSerializer.Tokenizer_</a></span>
     </div>


     <div class="entryOverview">
       The current tokenizer.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_proto2_textformatserializer.js.source.html#line566">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>




<h2>Static Methods</h2>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.proto2.TextFormatSerializer.Parser.getNumberFromString_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.proto2.TextFormatSerializer.Parser.</span><span class="entryName">getNumberFromString_<span class="args">(<span class="arg">num</span>)</span>
        </span>
        &#8658; <span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
      </div>


     <div class="entryOverview">
       Attempts to convert a string to a number.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">num</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">in hexadecimal or float format.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>&nbsp;
            The converted number or null on error.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_proto2_textformatserializer.js.source.html#line672">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.proto2.TextFormatSerializer.Parser.parseNumericalConstant_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.proto2.TextFormatSerializer.Parser.</span><span class="entryName">parseNumericalConstant_<span class="args">(<span class="arg">identifier</span>)</span>
        </span>
        &#8658; <span>?</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
      </div>


     <div class="entryOverview">
       Parse NaN, positive infinity, or negative infinity from a string.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">identifier</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">An identifier string to check.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>?</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>&nbsp;
            Infinity, negative infinity, NaN, or null if none
    of the constants could be parsed.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_proto2_textformatserializer.js.source.html#line693">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>









<div class="section">
  <table class="horiz-rule">


  </table>
</div>









<div class="section">
  <table class="horiz-rule">


  </table>
</div>
      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Package proto2.TextFormatSerializer</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">Package Reference</h2>
            <div id="sideTypeIndex" rootPath="" current="proto2.TextFormatSerializer.Parser"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
